package com.pinc.poop;

import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class about extends PwdWidgetActivity{

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.about);
		initWidget();
	}

	@Override
	protected void initWidget() {
		super.initWidget();
		tv_right.setImageDrawable(getResources().getDrawable(R.drawable.back));
		tv_right.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				finish();
			}
		});

		tv_left.setVisibility(View.INVISIBLE);

		tv_title.setText(getResources().getString(R.string.str_about));

		TextView tv_ver = (TextView) this.findViewById(R.id.textView_ver);
		try {
			tv_ver.setText(getPackageManager().getPackageInfo(getPackageName(), 0).versionName);
		} catch (NameNotFoundException e) {
			e.printStackTrace();
		}

		TextView tv_fbPage = (TextView)this.findViewById(R.id.textView_FB);
		tv_fbPage.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				Uri uri = Uri.parse("http://www.facebook.com/poopDiary");
				Intent intent_market = new Intent(Intent.ACTION_VIEW, uri);
				startActivity(intent_market);
			}
		});
	}

}
